import math
from math import atan,asin,sqrt
n = int(input())
l = []
for _ in range(n):
    x,y,r = map(int, input().split())
    theate = atan(y/x)
    b = asin(r/sqrt(x**2+y**2))
    l.append([theate-b,theate+b])
l.sort(key=lambda x:x[0])
ans = [l[0]]
for i in range(1, n):
    if l[i][0] <= ans[-1][1]:
        ans[-1][1] = max(l[i][1],ans[-1][1])
    else:
        ans.append(l[i])
thea = 0
for a in ans:
    thea += a[1] - a[0]
print(f"{1-2*thea/math.pi:.3f}")